<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 600px;
            height: 600px;

            border: 5px solid gray;
            display: grid;
            /*
              display:grid块级网格
              display:line-grid;行内块级网格
              display:grid;
            */
            /*1.固定值 */
            /* grid-template-rows: 200px 200px 200px;
               设置几行
               grid-template-columns: 200px 200px 200px;
               设置几列 */

            /*2.百分比 */
            /*grid-template-rows: 33.3% 33.3% 33.3%;
              grid-template-columns:33.3% 33.3% 33.3%; */

            /*3.repeat*/
            /* grid-template-rows: repeat(3,33.33%);
            grid-template-columns: repeat(3,33.33%); */

            /*4.repeat autofill */
            /* 自动计算铺满 */
            /* grid-template-rows: repeat(auto-fill,33.33%);
            grid-template-columns: repeat(auto-fill,33.33%); */
        
            /*5.fr 片段*/   
            grid-template-rows: 1fr 1fr 1fr;
            grid-template-columns: 1fr 1fr 1fr;
        
            /* 6.minmax */
            /* grid-template-rows: minmax(100px,200px) 200px 400px;
            grid-template-columns: 200px 200px 200px; */
        
            /* 7.auto 占满剩余空间*/
            /* grid-template-rows: 100px 200px auto;
            grid-template-columns: 100px auto 200px; */
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
        <div>8</div>
        <div>9</div>
    </div>
</body>
</html>